package com.top.art.controller;

import com.top.art.annotation.PermissionLimit;
import com.top.art.utils.AliyunOssUtil;
import com.top.art.vo.PaperFileVO;
import com.top.art.vo.ResVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.File;

/**
 * @author zhubg
 * @title: AliyunOssController
 * @projectName art-exam-manager
 * @description: TODO
 * @date 2020/10/5-15:30
 */
@RestController
@RequestMapping("/aliyunOss")
public class AliyunOssController {

    @Autowired
    private AliyunOssUtil aliyunOssUtil;


    @GetMapping(value = "/assumeRole")
    @PermissionLimit(limit = false)
    public ResVO assumeRole() {
        // STS临时授权访问OSS
        return new ResVO<>(aliyunOssUtil.assumeRole());
    }

}
